package com.cmfi.service.inter;

import java.time.Instant;
import java.util.HashMap;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.cmfi.domain.Line;

@Transactional
public interface LineService {
	
	/**
	 * Updates a line.
	 *
	 * @param line the entity to update.
	 * @return the persisted entity.
	 */
	public boolean update(Line line, Long id) throws Exception;
	
	/**
	 * Get the output of lines.
	 * 
	 * @return the output of lines
	 * @throws Exception
	 */
	public long getTodayOutput() throws Exception;
    
	/**
	 * Get the historical output of lines.
	 * 
	 * @return the historical output of lines
	 * @throws Exception
	 */
	public long getHistoryOutput(String beginningTime, String endTime) throws Exception;
	
	/**
	 * Get the operating efficiency of lines.
	 * 
	 * @return the operating efficiency of lines
	 * @throws Exception
	 */
	public long getOperatingEfficiency() throws Exception;
	
	/**
	 * Get the today's running time of lines.
	 * 
	 * @return the today's running time of lines
	 * @throws Exception
	 */
	public List<HashMap<Object, String>> getTodayRunningTime() throws Exception;
	
	/**
	 * Get the total running time of lines.
	 * 
	 * @return the total running time of lines
	 * @throws Exception
	 */
	public List<HashMap<Object, String>> getTotalRunningTime(String beginningTime, String endTime) throws Exception;

	/**
	 * Get the activation of lines.
	 * @param endTime 
	 * @param beginningTime 
	 * 
	 * @return the activation of lines.
	 * @throws Exception
	 */
	public List<HashMap<Object, String>> getActivation(String beginningTime, String endTime) throws Exception;
	
}
